import mongoose from 'mongoose'
import config from '../config'

mongoose.connect(
  config.dbUrl,
  { useNewUrlParser: true, useUnifiedTopology: true, useFindAndModify: false },
  () => console.log('MongoDB 连接成功了！')
)
mongoose.connection.on('error', console.error)
